home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / listview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.5 KB  |  74 lines

  1. // $Id: listview.h 1.2 1997/07/14 04:27:08 dlorre Exp dlorre $
  2. #ifndef CLASS_LISTVIEW_H
  3. #define CLASS_LISTVIEW_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #ifndef EXEC_NODES_H
  10. struct Node ;
  11. #endif
  12.  
  13. #ifndef EXEC_LISTS_H
  14. struct List ;
  15. #endif
  16.  
  17. #ifndef INTUITION_INTUITION_H
  18. struct Gadget ;
  19. struct Window ;
  20. struct Image ;
  21. #endif
  22.  
  23. #ifndef CLASS_WINDOW_H
  24. class window ;
  25. #endif
  26.  
  27. #ifndef CLASS_GADGETLIST_H
  28. class gadgetlist ;
  29. #endif
  30.  
  31. #ifndef CLASS_GADGET_H
  32. #include "gadgets/gadget.h"
  33. #endif
  34.  
  35. #ifndef CLASS_SLIST_H
  36. class nlist ;
  37. class nlink ;
  38. #endif
  39.  
  40. // ========================================================================
  41. // ==========================  LISTVIEW CLASS =============================
  42. // ========================================================================
  43.  
  44. class listview : public gadget
  45. {
  46.     nlink *sl ;
  47.     List *l ;
  48.     Node *n ;
  49.     Node *c ;
  50.     int created ;
  51. public:
  52.     int count ;
  53.     int cursel ;
  54.     int curtop ;
  55.     listview(gadgetlist *gl,
  56.          void (window::*func)(gadget *, unsigned long, unsigned short),
  57.          const char* title,
  58.          unsigned long place,
  59.          nlist *liste,
  60.          unsigned short top=0,
  61.          unsigned short sel=~0,
  62.          short readonly=FALSE,
  63.          unsigned short swidth=16,
  64.          Gadget *showsel=NULL) ;
  65.  
  66.     ~listview() ;
  67.     void set(unsigned short top, unsigned short sel=~0) ;
  68.     void reset(nlist *liste, unsigned short top=0, unsigned short sel=~0) ;
  69.     void keystroke(BOOL shifted) ;
  70.     void action(unsigned long classe, unsigned short code) ;
  71. };
  72.  
  73. #endif
  74.